home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 1.iso / dist / fw_qt.idb / usr / freeware / include / qwizard.h.z / qwizard.h
C/C++ Source or Header  |  2001-04-12  |  4KB  |  134 lines

  1. /****************************************************************************
  2. ** $Id: qt/src/dialogs/qwizard.h   2.3.0   edited 2001-01-26 $
  3. **
  4. ** Definition of the QWizard class.
  5. **
  6. ** Created : 990101
  7. **
  8. ** Copyright (C) 1999 by Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the dialogs module of the Qt GUI Toolkit.
  11. **
  12. ** This file may be distributed under the terms of the Q Public License
  13. ** as defined by Trolltech AS of Norway and appearing in the file
  14. ** LICENSE.QPL included in the packaging of this file.
  15. **
  16. ** This file may be distributed and/or modified under the terms of the
  17. ** GNU General Public License version 2 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.GPL included in the
  19. ** packaging of this file.
  20. **
  21. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  22. ** licenses may use this file in accordance with the Qt Commercial License
  23. ** Agreement provided with the Software.
  24. **
  25. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  26. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  27. **
  28. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  29. **   information about Qt Commercial License Agreements.
  30. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  31. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  32. **
  33. ** Contact info@trolltech.com if any conditions of this licensing are
  34. ** not clear to you.
  35. **
  36. **********************************************************************/
  37.  
  38. #ifndef QWIZARDDIALOG_H
  39. #define QWIZARDDIALOG_H
  40.  
  41.  
  42. #ifndef QT_H
  43. #include "qdialog.h"
  44. #endif // QT_H
  45.  
  46. #ifndef QT_NO_WIZARD
  47.  
  48. class QWizardPrivate;
  49. class QWizardPagePrivate;
  50. class QWizard;
  51. class QHBoxLayout;
  52.  
  53. class Q_EXPORT QWizard : public QDialog
  54. {
  55.     Q_OBJECT
  56. public:
  57.     QWizard( QWidget *parent=0, const char *name=0, bool modal=FALSE,
  58.          WFlags f=0 );
  59.     ~QWizard();
  60.  
  61.     void show();
  62.  
  63.     void setFont( const QFont & font );
  64.  
  65.     virtual void addPage( QWidget *, const QString & );
  66.     virtual void removePage( QWidget * );
  67.  
  68.     QString title( QWidget * ) const;
  69.     void setTitle( QWidget *, const QString & );
  70.     
  71.     virtual void showPage( QWidget * );
  72.  
  73.     QWidget * currentPage() const;
  74.  
  75.     QWidget* page( int pos ) const;
  76.     int pageCount() const;
  77.  
  78.     virtual bool appropriate( QWidget * ) const;
  79.     virtual void setAppropriate( QWidget *, bool );
  80.  
  81.     QPushButton * backButton() const;
  82.     QPushButton * nextButton() const;
  83.     QPushButton * finishButton() const;
  84.     QPushButton * cancelButton() const;
  85.     QPushButton * helpButton() const;
  86.  
  87.     bool eventFilter( QObject *, QEvent * );
  88.  
  89. public slots:
  90.     virtual void setBackEnabled( QWidget *, bool );
  91.     virtual void setNextEnabled( QWidget *, bool );
  92.     virtual void setFinishEnabled( QWidget *, bool );
  93.  
  94.     virtual void setHelpEnabled( QWidget *, bool );
  95.  
  96.     virtual void setFinish(  QWidget *, bool );
  97.  
  98. protected slots:
  99.     virtual void back();
  100.     virtual void next();
  101.     virtual void help();
  102.  
  103. signals:
  104.     void helpClicked();
  105.     void selected( const QString& );
  106.  
  107. protected:
  108.     virtual void layOutButtonRow( QHBoxLayout * );
  109.     virtual void layOutTitleRow( QHBoxLayout *, const QString & );
  110.  
  111. private:
  112.     void setBackEnabled( bool );
  113.     void setNextEnabled( bool );
  114.  
  115.     void setHelpEnabled( bool );
  116.  
  117.     void setNextPage( QWidget * );
  118.  
  119.     void updateButtons();
  120.  
  121.     void layOut();
  122.     QWizardPrivate *d;
  123.  
  124. private:    // Disabled copy constructor and operator=
  125. #if defined(Q_DISABLE_COPY)
  126.     QWizard( const QWizard & );
  127.     QWizard& operator=( const QWizard & );
  128. #endif
  129. };
  130.  
  131. #endif // QT_NO_WIZARD
  132.  
  133. #endif // QWIZARD_H
  134.